package com.ruoyi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 能源生产量
 * @TableName ny2
 */
@TableName(value ="ny2")
@Data
public class Ny2 implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 能源类型
     */
    private String ny;

    /**
     * 能源生产量
     */
    private String nyxhl2;

    /**
     * 时间范围（日/周/月/年）
     */
    private String sjfw2;

    /**
     * 地域范围
     */
    private String dyfw2;

    /**
     * 能源生产结构（%）
     */
    private Long nyxhjg2;

    /**
     * 能源生产趋势
     */
    private Long nyxhqs2;

    /**
     * 能源生产排名
     */
    private Long nyxhpm2;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Ny2 other = (Ny2) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNy() == null ? other.getNy() == null : this.getNy().equals(other.getNy()))
            && (this.getNyxhl2() == null ? other.getNyxhl2() == null : this.getNyxhl2().equals(other.getNyxhl2()))
            && (this.getSjfw2() == null ? other.getSjfw2() == null : this.getSjfw2().equals(other.getSjfw2()))
            && (this.getDyfw2() == null ? other.getDyfw2() == null : this.getDyfw2().equals(other.getDyfw2()))
            && (this.getNyxhjg2() == null ? other.getNyxhjg2() == null : this.getNyxhjg2().equals(other.getNyxhjg2()))
            && (this.getNyxhqs2() == null ? other.getNyxhqs2() == null : this.getNyxhqs2().equals(other.getNyxhqs2()))
            && (this.getNyxhpm2() == null ? other.getNyxhpm2() == null : this.getNyxhpm2().equals(other.getNyxhpm2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNy() == null) ? 0 : getNy().hashCode());
        result = prime * result + ((getNyxhl2() == null) ? 0 : getNyxhl2().hashCode());
        result = prime * result + ((getSjfw2() == null) ? 0 : getSjfw2().hashCode());
        result = prime * result + ((getDyfw2() == null) ? 0 : getDyfw2().hashCode());
        result = prime * result + ((getNyxhjg2() == null) ? 0 : getNyxhjg2().hashCode());
        result = prime * result + ((getNyxhqs2() == null) ? 0 : getNyxhqs2().hashCode());
        result = prime * result + ((getNyxhpm2() == null) ? 0 : getNyxhpm2().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ny=").append(ny);
        sb.append(", nyxhl2=").append(nyxhl2);
        sb.append(", sjfw2=").append(sjfw2);
        sb.append(", dyfw2=").append(dyfw2);
        sb.append(", nyxhjg2=").append(nyxhjg2);
        sb.append(", nyxhqs2=").append(nyxhqs2);
        sb.append(", nyxhpm2=").append(nyxhpm2);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}